from rai.tagger.tagger import *
import nltk, re, pprint
from nltk.tokenize import *

def testTagger():
    print "TEST TAGGER"
    sentence = "The quick brown fox jumps over the lazy dog"
    tagStore = TagStore()
    tagger = tagStore.loadTagger("brown_a")
    print "TAGGER LOADED"
    words = sentence.split()
    print tagger.tag(words)
    sentence2 = "Anna Mae Bullock, better known by her stage name Tina Turner is an American singer, dancer and entertainer"
    words = sentence2.split()
    print tagger.tag(words)

line = "Anna Mae Bullock is an American singer, dancer and entertainer."
lines = "Anna Mae Bullock is an American singer, dancer and entertainer. She was born in St. Louis. She was the head of company D.G. Europe"

tokenizer = WordPunctTokenizer()
output = tokenizer.tokenize(line)
print output

tokenizer = PunktSentenceTokenizer()
output = tokenizer.tokenize(lines)
print output
output = tokenizer.sentences_from_text(lines)
for o in output:
    print o